package cn.itsy.web.controller;

import cn.itsy.pojo.SysRole;
import cn.itsy.service.sysrole.SysRoleService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @description:
 * @author: MisterGay
 * @date: 2019-06-17 8:38
 */
@Controller
@RequestMapping("sys")
public class SysRoleController {
    @Resource(name = "sysRoleServiceimpl")
    private SysRoleService sysRoleService;

    @RequestMapping(value = "querySysRoleAll", method = RequestMethod.GET)
    @ResponseBody
    public List<SysRole> querySysRoleAll() {
        String sql = "select * from sys_role";
        return this.sysRoleService.querySysRoleAll(sql);
    }
}
